var app = angular.module("app",[]);
app.controller('app_control',function($scope,$http,$location){
	//示例参数
    //ajax
    if (location.search.split('?')[1]){
    	id = location.search.split('?')[1]
    }else{
    	alert('sorry,没有传数据参数（提示：txt编号）')
    }
    $http({
         method:'GET',
         url:'http://192.168.19.55:8888/huazhuprice/wechat/warning_info/'+id+'/',
     }).then(function successCallback (rs){
         $scope.word1 = rs.data.huazhu;
         $scope.word2 = rs.data.ctrip;
         $scope.arrays = [
		    {
		    	"title":"华住",
		    	"word": $scope.word1
		    },
		    {
		       	"title":"铂涛",
		        "word": $scope.word2
		    }
		]
     });
    $scope.show = function(index){
        $scope.tab = index;
    }; 
});
